<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // var str = "111d332432";  // 匹配 数字a或者b或者c数字

        // var reg = /^\d{3}[abc]\d+$/g;
        // console.log(reg.test(str));


        // var str = "fdsaf22fdsaf";
        // var reg = /^\w+[^1-36]\w+$/g;

        var str = "fdsafdsa4535dsafdsaaafd54545sfdsa";
        var reg = /(^[a-z]+)(\d+)[a-z]+\d+[a-z]+/g;
        console.log(reg.test(str));
        console.log(RegExp.$1);
        console.log(RegExp.$2);
        // 分组 1.避免歧义 2. 获取指定匹配内容



    </script>
</body>
</html>